<template>
  <div class="home_container">
    <div class="home_header">
      <img src="@/assets/image/bj.png" />
      <!-- <span class="title"> 申请补贴 </span> -->
    </div>
    <div class="home_content">
      <div class="home_block" @click="toPath('/apply')">
        <div class="tb_img">
          <img src="@/assets/image/sqlr.png" alt="" />
          <span>申请办理</span>
        </div>
      </div>
      <div class="home_block" @click="toPath('/query')">
        <div class="tb_img">
          <img src="@/assets/image/sqlb.png" alt="" />
          <span>申请列表</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    toPath(path) {
      if (!this.$store.state.token) {
        this.$zgtToast.fail({
          duration: 3000, // 持续展示 toast
          forbidClick: true,
          message: '请使用App',
        })
        return
      }
      this.$router.push(path);
    },
  },
};
</script>

<style lang="less" scoped>
.home_container {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #fff;

  .home_header {
    width: 100%;
    font-size: 14px;
    color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
      width: 100%;
      vertical-align: top;
    }

    .title {
      color: #fff;
      font-weight: bold;
      font-size: 16px;
      position: absolute;
    }
  }

  .home_content {
    width: 100%;
    position: relative;
    top: -30px;

    .home_block {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 0 15px 20px;
      border-radius: 5px;
      padding: 25px 20px;

      &:nth-child(1) {
        background-color: #e7f3ff;
      }

      &:nth-child(2) {
        background-color: #fff3f1;
      }

      .tb_img {
        img {
          vertical-align: middle;
        }

        span {
          margin-left: 20px;
          font-size: 18px;
          font-weight: bold;
          color: #202439;
        }
      }
    }
  }
}
</style>
